<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/templates/main-layout.xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="title">
        <h:outputText value="#{msg.report_date_title}"></h:outputText>
    </ui:define>
    <ui:define name="content">
        <h:panelGroup id="messagePanel" layout="block">
            <h:messages globalOnly="true" errorStyle="color: red" infoStyle="color: green" />
        </h:panelGroup>
        <h4>#{msg.report_date_header}</h4>
        <h:form target="_blank">
            <h:panelGrid columns="3">
                <h:outputLabel styleClass="formLabel" value="#{msg.start_date_label}" for="startDate" />
                <p:calendar id="startDate" value="#{report.startDate}" title="#{msg.start_date_label}"
                            required="true" requiredMessage="#{msg.required_date_message}"
                            mode="popup" navigator="true" pattern="MM/dd/yyyy">
                </p:calendar>
                <h:message for="startDate"  errorStyle="color: red" />
                <h:outputLabel styleClass="formLabel" value="#{msg.stop_date_label}" for="stopDate" />
                <p:calendar id="stopDate" value="#{report.stopDate}" title="#{msg.stop_date_label}"
                            required="true" requiredMessage="#{msg.required_date_message}"
                            mode="popup" navigator="true" pattern="MM/dd/yyyy">
                </p:calendar>
                <h:message for="stopDate"  errorStyle="color: red" />
            </h:panelGrid>
            <h:commandButton styleClass="formButton" action="#{home.mainMenu}" value="#{msg.home_button_label}" immediate="true" />
            <h:commandButton styleClass="formButton" action="#{report.createReportByDates}" value="#{msg.generate_report_label}" />
        </h:form>
    </ui:define>
</ui:composition>